package org.example.task;

import org.springframework.stereotype.Component;

import com.xxl.job.core.handler.annotation.XxlJob;
import com.xxl.job.plus.executor.annotation.XxlRegister;

/**
 * @author : guorf
 * @version : v1.0
 * @description : TODO
 * @createTime : 2023/4/23 11:03
 */
@Component
public class TestTask {
    @XxlJob(value = "testJob")
    @XxlRegister(cron = "0 0 0 * * ? *", author = "hydra", jobDesc = "测试job")
    public void testJob(){
        System.out.println("#公众号：码农参上");
    }


    @XxlJob(value = "testJob222")
    @XxlRegister(cron = "59 1-2 0 * * ?", triggerStatus = 1)
    public void testJob2(){
        System.out.println("#作者：Hydra");
    }

    @XxlJob(value = "testJob444")
    @XxlRegister(cron = "59 59 23 * * ?")
    public void testJob4(){
        System.out.println("hello xxl job");
    }

    @XxlJob(value = "testJob5")
    @XxlRegister(cron = "0 0/1 * * * ?", jobDesc ="测试", author = "grf", triggerStatus = 1)
    public void testJob5(){
        System.out.println("你好");
    }
}
